import { defineStore } from 'pinia'
import {toRefs} from "vue"

import S_zc from './S_zc'
let data_szc=toRefs(S_zc())

import L_fulong from "./L_fulong"
let data_lfl=toRefs(L_fulong())

import L_xin from "./L_xin"
let data_Lx=toRefs(L_xin())

import T_qiao from "./T_qiao"
let data_Tq=toRefs(T_qiao())

import X_yulin from "./X_yulin"
let data_Xy=toRefs(X_yulin())

import Z_han from "./Z_han"
let data_Zh=toRefs(Z_han())


const store = defineStore('store_zhong', {
    // 这里易错语法:如果箭头函数直接指向返回值的同学  记得把返回的对象用小括号括起来
    state: () => {
        return {
            // 用户部分
            username:"请登录",

            // 医生部分
            id:100,
            codeUrl:"",
            doid:0, //医生 id选择问题，如果已经选择赋值过了，后面不会再创建ws实例对象
            change:false,
            imgURl:null,
            doctorName:"医生",

            // zh
            
            search_res:[],
            disease_tag:"",
            doctor_res:[],
            initial_tag:"",
            nav:"查疾病",



            data_szc:data_szc,
            data_lfl:data_lfl,
            data_Lx:data_Lx,
            data_Tq:data_Tq,
            data_Xy:data_Xy,
            data_Zh:data_Zh
        }
    },
    actions:{
        chack(x){
            // this.username=x
            console.log(x)
        }
    }
})
export default store